use anyhow::Result;
use sqlx::{MySql, Pool};

use crate::app_config;
pub async fn get_conn() -> Result<Pool<MySql>> {
    let db_str = app_config::APP_CONFIG.database();
    let pool = sqlx::MySqlPool::connect(db_str).await?;
    Ok(pool)
}
